package demo2;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: fzykd
 * Date: 2022-05-09
 * Time: 17:15
 */

abstract class Shape{
    public  abstract void draw();
}

abstract class A extends Shape{
    public abstract void funcA();
}

class B extends A{//一个抽象类A如果继承了一个抽象类B 可以不实现 抽象父类的抽象方法
    //但是：当A类再次被普通类继承后 那么这个普通类必须重写A和B这两个抽象类的抽象方法
    @Override
    public void draw() {

    }

    @Override
    public void funcA() {

    }
}

class Rect extends Shape {

    public void draw(){System.out.println("♦");}}

class Flower extends Shape {
    public void draw(){
        System.out.println("❀");
    }
}

public class Test {

}
